//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.example.mapper;

import com.example.entity.Notification;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NotificationMapper {
    List<Notification> selectAll(Notification notification);

    @Select({"select * from notification where id = #{id}"})
    Notification selectById(Integer id);

    @Insert({"insert into notification (club_id, activity_id, title, content_text, publish_time) values (#{clubId}, #{activityId}, #{title}, #{contentText}, #{publishTime})"})
    int insert(Notification notification);

    @Update({"update notification set club_id = #{clubId}, activity_id = #{activityId}, title = #{title}, content_text = #{contentText}, publish_time = #{publishTime} where id = #{id}"})
    int updateById(Notification notification);

    @Delete({"delete from notification where id = #{id}"})
    int deleteById(Integer id);

    List<Notification> selectByClubIds(@Param("clubIds") List<Integer> clubIds);
}
